package com.apress.springrecipes.shop;

public abstract class Product {
	private String name;
	private double price;
	//public static final Product AAA = new Battery("AAA", 2.5);
	public static final Product CDRW = new Disc("CD-RW", 1.5);
	
	public Product() {}
	public Product(String name, double price) {
	this.name = name;
	this.price = price;
	}
	// Getters and Setters
	
	public void setName(String name)
	{
		this.name = name;
	}
	public String getName()
	{
		return this.name;
	}
	
	public void setPrice(double price)
	{
		this.price = price;
	}
	public double getPrice()
	{
		return this.price;
	}
	
	public String toString() {
	return name + " " + price;
	}
}
